import { Component, OnInit, Injector } from '@angular/core';
import { NgZorroPageBaseComponent } from '../core/ng-zorro-page-base-component/ng-zorro-page-base-component.component';
import { HttpService } from "../core/service/http.service";
import { Router, NavigationExtras } from "@angular/router";
import {
  AndOr, Compare, ExpressionPair, PagedResultDto, PagerSearchInput, ElementViewType, BaseComponentConfig,
  SystemFormControl, FieldType, ElementShowType, CustomNavigation, SystemDictionaryOutput, LoadRemoteDataType, ArSystemFormControl
} from "..";
import { NzMessageService, NzModalService } from 'ng-zorro-antd';
import {
  FormBuilder, FormGroup, FormsModule, ReactiveFormsModule, Validators,
  FormControl
} from "@angular/forms";


@Component({
  selector: 'app-system-form-test',
  templateUrl: '../core/ng-zorro-page-base-component/ng-zorro-page-base-component.component.html',
  styleUrls: ['../core/ng-zorro-page-base-component/ng-zorro-page-base-component.component.scss']
})
export class DictionaryComponent extends NgZorroPageBaseComponent implements OnInit {
  constructor(injector: Injector) {
    super(injector,
      new BaseComponentConfig("Dictionary/GetAll", "Dictionary/Create", "Dictionary/Update",
        "Dictionary/Get", "Dictionary/Delete", "id", "Dictionary", "数据字典管理"),
      new ArSystemFormControl(
        new Array<SystemFormControl>(
          new SystemFormControl("groupName", "字典分组", FieldType.Text, true, 30, 0, "", "", true, null, null),
          new SystemFormControl("caption", "字典标题", FieldType.Text, true, 30, 0, "", "", true, null, null),
          new SystemFormControl("dValue", "字典值", FieldType.Text, true, 30, 0, "", "", false, null, null)
        )
      ));
  }


  getNewEntity(): SystemDictionaryOutput {
    return new SystemDictionaryOutput();
  }

  async navigateCustom(url: string, pid: any) {

  }

  showModalForComponent() {
    throw new Error("Method not implemented.");
  }
}
